package com.seteam.collabcrossword.workers;

import com.seteam.collabcrossword.CommunicationChannel;
import com.seteam.collabcrossword.messages.Message;

import javax.swing.*;
import java.net.Socket;

public class LetterUpdater extends SwingWorker<Boolean, Character> {
    //Needs the socket with which it'll talk to the server
    //Takes a letter, creates an update letter message, and sends it over
    //Probably does not have to do anything once the letter is sent
    //Is this the best way to do it? What if another task requires the socket
    //to send something over to the server?
    private Socket socket;
    private CommunicationChannel channel;
    
    public LetterUpdater(final Socket socket) {
        this.socket = socket;
    }
    
    @Override
    protected Boolean doInBackground() throws Exception {
        //channel.sendMessage(this, new Connect(null));
        return null;
    }

    //@Override
    public void receive(final Message message) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
